package cn.like.entity;

import cn.like.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 组织(CoreOrg)表实体类
 *
 * @author like
 * @since 2021-07-08 15:59:15
 */
@Data
@TableName("core_org")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "组织")
@SuppressWarnings("serial")
public class CoreOrg extends BaseEntity<CoreOrg> {
	
	public static final String id_col_name = "id";
	public static final String name_col_name = "name";
	public static final String abbreviation_col_name = "abbreviation";
	public static final String parentId_col_name = "parent_id";
	public static final String treePath_col_name = "tree_path";
	public static final String sortValue_col_name = "sort_value";
	public static final String status_col_name = "status";
	public static final String describe__col_name = "describe_";
	public static final String createTime_col_name = "create_time";
	public static final String createUser_col_name = "create_user";
	public static final String updateTime_col_name = "update_time";
	public static final String updateUser_col_name = "update_user";
	
	
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键")
	@NotNull(message = "id不能为空")
	private Long id;
	
	/**
	 * 名称
	 */
	@ApiModelProperty(value = "名称")
	private String name;
	
	/**
	 * 简称
	 */
	@ApiModelProperty(value = "简称")
	private String abbreviation;
	
	/**
	 * 父ID
	 */
	@ApiModelProperty(value = "父ID")
	private Long parentId;
	
	/**
	 * 树结构
	 */
	@ApiModelProperty(value = "树结构")
	private String treePath;
	
	/**
	 * 排序
	 */
	@ApiModelProperty(value = "排序")
	private Integer sortValue;
	
	/**
	 * 状态
	 */
	@ApiModelProperty(value = "状态")
	private Integer status;
	
	/**
	 * 描述
	 */
	@ApiModelProperty(value = "描述")
	private String describe_;
	/**
	 * 创建人id
	 */
	@ApiModelProperty(value = "创建人id")
	@TableField(fill = FieldFill.INSERT)
	private Long createUser;
	
	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;
	
	/**
	 * 更新人id
	 */
	@ApiModelProperty(value = "更新人id")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Long updateUser;
	
	/**
	 * 更新时间
	 */
	@ApiModelProperty(value = "更新时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime updateTime;
	
}